//
//  NSDictionary+Normal.m
//  Manage
//
//  Created by 杨康 on 2018/1/24.
//  Copyright © 2018年 杨康. All rights reserved.
//

#import "NSDictionary+Normal.h"
#import "objc/runtime.h"
@implementation NSDictionary (Normal)
+ (void)load {
    [super load];
    Method fromMethod = class_getInstanceMethod(objc_getClass("__NSDictionaryI"), @selector(objectAtIndex:));
    Method toMethod = class_getInstanceMethod(objc_getClass("__NSDictionaryI"), @selector(lxz_objectForKey:));
    method_exchangeImplementations(fromMethod, toMethod);
}
- (NSString *)lxz_objectForKey:(NSString *)key {
    
    
    
    //判断字典有没有code key
    if ([self lxz_objectForKey:key]) {
        //3. code转化为字符串 防止类型崩溃
        NSString *code = [NSString stringWithFormat:@"%@",[self lxz_objectForKey:key]];
        return code;
    }else
    {
        return @"";
    }
    
    
}
@end
